package testcase.framework;

import junit.framework.TestCase;

import org.junit.Test;

import satir.card.*;
import satir.command.Command;
import satir.framework.LazyInitiator;

public class LazyInitiator_getDeck_1 extends TestCase{
	
	//Step1, Create object of Deck for different card type (SayCard, ActCard and EventCard)
	@Test
	public void testGetDeckStep1(){
		Deck sayDeck = (Deck)LazyInitiator.get("Deck", "SayCard");
		assertNotNull(sayDeck);
		Deck actDeck = (Deck)LazyInitiator.get("Deck", "ActCard");
		assertNotNull(actDeck);
		Deck eventDeck = (Deck)LazyInitiator.get("Deck", "EventCard");
		assertNotNull(eventDeck);
	}
	
	//Step2, Create object of Deck for MagicToolCard
	@Test
	public void testGetDeckStep2(){
		Deck deck = (Deck)LazyInitiator.get("Deck", "MagicToolCard");
		assertNotNull(deck);
	}
	
	//Step3, Get the same instance from pool
	@Test
	public void testGetDeckStep3(){
		Deck deck1 = (Deck)LazyInitiator.get("Deck", "SayCard");
		assertNotNull(deck1);
		Deck deck2 = (Deck)LazyInitiator.get("Deck", "SayCard");
		assertEquals(deck1, deck2);
	}
}
